#pragma once

#include <QtWidgets/QWidget>
#include "ui_mainwindow.h"
#include <QTimer>
#include <QDateTime>
#include <QSettings>

class MainWindow : public QWidget
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = nullptr);
    ~MainWindow();
protected slots:
    void updateTime();
    void toggleClockMode();
    void toggleTheme();
    void onAlarmTriggered();
    void onSettingsChanged();
    void updatePanel(bool);
protected:
    void setupUI();
    void setupMenuBar();
    void setupSettingsPanel();
    void loadSettings();
    void saveSettings();
private:
    Ui::MainWindowClass ui;

    QTimer* m_timer;
	QDateTime m_currentTime;
    bool m_isDarkTheme;
	bool m_showSeconds;
    bool m_user24Hour;
    bool m_alarmEnabled;
    bool m_showPanel;
	QTime m_alarmTime;
	QSettings m_settings;
};
